#!/bin/bash

source sharedfunctions.sh

setupvariables

while true; do
  RESULTS="$RESULTSPATH/hdctestresults.$(date +"%Y%m%d.%H%M%S").csv"
  [ ! -e $RESULTS ] && break
done

# You can use "column -s , -t" instead of awk command:
if [ "$1" = "--columns" ]; then
  tabs 42,83,124,158,180,200,225,250,275,290,305,320
  FIELDSEP="\t"
else
  FIELDSEP=","
fi

bash runalltests.sh | tee $RESULTS | awk -v FS="," -v OFS="$FIELDSEP" '{$1=$1; print}'

